package com.masterlu.leetcode.daily.greedy.simple;

/**
 * @date created in 2021/6/3 11:08
 */
public class S605CanPlaceFlowers {

    public boolean canPlaceFlowers(int[] flowerbed, int n) {

        int count = 0;
        for (int i = 0; i < flowerbed.length; i++) {
            if (flowerbed[i] == 0){
                if (i == 0){}
            }else {
                count ++;
            }
        }

        if (count >= n){
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }
}
